#include <stdio.h>

/*
	输入一个二叉树，输出其镜像。
*/

typedef struct TreeNode
{
	int data;
	struct TreeNode *LeftSon, *RightSon;
} BinTree;

void mirror(BinTree *root)
{
	BinTree *temp = root->LeftSon;
	root->LeftSon = root->RightSon;
	root->RightSon = temp;
	if (root->LeftSon != NULL)
	{
		mirror(root->LeftSon);
	}
	if (root->RightSon != NULL)
	{
		mirror(root->RightSon);
	}
}
